<?php

// echo $_SERVER['SCRIPT_NAME'];
// echo "<br/>";

$base_path = substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], 'api'));
echo $base_path;
?>